package com.example.demo.mapper;

import com.example.demo.main.UserOrder;
import com.example.demo.main.UserOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserOrderMapper {
    long countByExample(UserOrderExample example);

    int deleteByExample(UserOrderExample example);

    int deleteByPrimaryKey(String orderId);

    int insert(UserOrder record);

    int insertSelective(UserOrder record);

    List<UserOrder> selectByExample(UserOrderExample example);

    UserOrder selectByPrimaryKey(String orderId);

    int updateByExampleSelective(@Param("record") UserOrder record, @Param("example") UserOrderExample example);

    int updateByExample(@Param("record") UserOrder record, @Param("example") UserOrderExample example);

    int updateByPrimaryKeySelective(UserOrder record);

    int updateByPrimaryKey(UserOrder record);

    List<UserOrder> selectAllOfLimit(@Param("name")String name,@Param("index")Integer index, @Param("offset")Integer offset);

    int selectAllCountOfOrdersat(String name);

    @Select("SELECT COUNT(*) FROM user_order")
    int selectAllCount();

    List<UserOrder> selectOrderOfPay(String orderStatus);
}